home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / uwpc201.zip / UW-SRC.ZIP / MAKEFILE < prev    next >
Text File  |  1991-11-03  |  5KB  |  162 lines

  1. # Makefile for UW/PC and Turbo C++
  2. #  by Rhys Weatherley, 1991
  3.  
  4. # You will need to change the "BGIOBJ" variable to point to your version
  5. # of "BGIOBJ" before using this makefile with Turbo C++.
  6.  
  7. # Note that BISON and FLEX are required to compile the source code for
  8. # the Termcap Compiler.  If you do not have these, you can either contact
  9. # the author for versions that have been modified for Turbo C++, or
  10. # you can remove the references for building TERMCC.EXE from this makefile,
  11. # and just use the supplied TERMCC.EXE for compiling the capability files.
  12.  
  13. #CFLAGS=-mc -v
  14. CFLAGS=-mc
  15. COMMS=comms.c
  16. OBJECTS=main.obj screen.obj comms.obj client.obj keys.obj uw.obj display.obj \
  17.     config.obj terminal.obj vt52.obj adm31.obj ansi.obj timer.obj \
  18.     dialog.obj files.obj xmodem.obj clipbd.obj mouse.obj clients.obj \
  19.     mail.obj login.obj
  20. COMPILE=tcc $(CFLAGS)
  21. BGIOBJ=d:\tc\bgi\bgiobj
  22. LEXOPTS=-s
  23. BSNOPTS=-dy
  24. TFLAGS=-w-rch -w-rvl -w-dup -w-par
  25. TOBJECTS=lexyy.obj y_tab.obj termcc.obj symbols.obj
  26.  
  27. all:        uw.exe termcc.exe setmode.com
  28.  
  29. # Link the final executable for UW/PC.
  30. uw.exe:        uw.lib
  31.         $(COMPILE) -M -euw.exe uw.lib
  32.  
  33. # Create a library of all the objects for the UW/PC executable.
  34. uw.lib:        $(OBJECTS) uw.rsp
  35.         tlib uw.lib /C @uw.rsp
  36.  
  37. # Link the final executable for the Termcap Compiler.
  38. termcc.exe:    $(TOBJECTS)
  39.         $(COMPILE) $(TFLAGS) -M -etermcc.exe $(TOBJECTS)
  40.  
  41. # Compile the module COMMS.C [or COMMTEST.C] (everything else is CPP)
  42. comms.obj:    comms.h $(COMMS)
  43.         $(COMPILE) -ocomms.obj -c $(COMMS)
  44.  
  45. # Compile the files for the Termcap Compiler.
  46. termcc.obj:    termcc.c
  47.         $(COMPILE) $(TFLAGS) -c termcc.c
  48.  
  49. symbols.obj:    symbols.h symbols.c
  50.         $(COMPILE) $(TFLAGS) -c symbols.c
  51.  
  52. lexyy.obj:    lexyy.c symbols.h
  53.         $(COMPILE) $(TFLAGS) -c lexyy.c
  54.  
  55. y_tab.obj:    y_tab.c symbols.h opcodes.h
  56.         $(COMPILE) $(TFLAGS) -c y_tab.c
  57.  
  58. lexyy.c:    termcc.l y_tab.c
  59.         flex $(LEXOPTS) termcc.l
  60.  
  61. y_tab.c:    termcc.y
  62.         bison $(BSNOPTS) termcc.y
  63.  
  64. # Transform the terminal descriptions into .OBJ files ready for linking.
  65. vt52.obj:    vt52.trm
  66.         $(BGIOBJ) /F vt52.trm vt52.obj _VT52_Driver VT52_TEXT
  67.  
  68. adm31.obj:    adm31.trm
  69.         $(BGIOBJ) /F adm31.trm adm31.obj _ADM31_Driver ADM31_TEXT
  70.  
  71. ansi.obj:    ansi.trm
  72.         $(BGIOBJ) /F ansi.trm ansi.obj _ANSI_Driver ANSI_TEXT
  73.  
  74. # Create the .TRM files from the .CAP terminal capability files.
  75. .cap.trm:
  76.         termcc $<
  77.  
  78. # Define the .TRM -> .EXE dependencies
  79. vt52.trm:    termcc.exe
  80. adm31.trm:    termcc.exe
  81. ansi.trm:    termcc.exe
  82.  
  83. # Define the .OBJ -> .CPP dependencies for module compilation
  84. .cpp.obj:
  85.         $(COMPILE) -c { $<}
  86.  
  87. # Define the .OBJ -> .H dependencies
  88. main.obj:    screen.h client.h uw.h keys.h config.h timer.h dialog.h \
  89.         files.h comms.h clipbd.h mouse.h extern.h
  90. screen.obj:    screen.h config.h mouse.h extern.h
  91. client.obj:    client.h display.h config.h uw.h comms.h extern.h clipbd.h \
  92.         mouse.h
  93. keys.obj:    keys.h config.h
  94. uw.obj:        uw.h comms.h client.h config.h display.h keys.h uwproto.h \
  95.         screen.h timer.h extern.h mouse.h
  96. display.obj:    display.h screen.h extern.h config.h
  97. config.obj:    config.h comms.h client.h opcodes.h screen.h extern.h
  98. terminal.obj:    client.h display.h opcodes.h screen.h config.h extern.h \
  99.         uw.h
  100. timer.obj:    timer.h
  101. dialog.obj:    dialog.h uw.h client.h screen.h display.h extern.h keys.h \
  102.         config.h
  103. files.obj:    files.h client.h uw.h keys.h extern.h
  104. xmodem.obj:    files.h client.h uw.h timer.h display.h
  105. clipbd.obj:    clipbd.h client.h display.h keys.h uw.h mouse.h
  106. mouse.obj:    client.h mouse.h screen.h extern.h
  107. clients.obj:    uw.h mail.h client.h login.h display.h extern.h
  108. mail.obj:    uw.h mail.h client.h display.h extern.h config.h
  109. login.obj:    uw.h client.h config.h login.h
  110.  
  111. # Create the small SETMODE.COM program from the debug script SETMODE.SCR
  112. setmode.com:    setmode.scr
  113.         debug <setmode.scr
  114.  
  115. # Create the backup ZIP file UWPC201X.ZIP
  116. backup:
  117.         -pkzip -u uwpc201x.zip *.c *.cpp *.h *.l *.y *.doc uw.cfg \
  118.             uweg.cfg setmode.scr makefile history *.cap readme
  119.  
  120. # Make a beta-release distribution (without server, etc) UWPC201B.ZIP
  121. beta:        uw.exe setmode.com
  122.         -tdstrip uw.exe
  123.         -pkzip -u uwpc201b.zip uw.exe *.doc uweg.cfg termcc.exe \
  124.                 uwftp.c setmode.com history
  125.  
  126. # Create the distribution ZIP file UWPC201.ZIP
  127. dist:        uw.exe termcc.exe setmode.com
  128.         mkdir dist
  129.         -tdstrip uw.exe
  130.         -tdstrip termcc.exe
  131.         copy copying dist
  132.         copy uw.exe dist
  133.         copy uw.doc dist
  134.         copy uweg.cfg dist
  135.         copy termcc.exe dist
  136.         copy termcc.doc dist
  137.         copy setmode.com dist
  138.         copy history dist
  139.         del dist\uw-src.zip
  140.         del lexyy.c
  141.         del y_tab.c
  142.         del y_tab.h
  143.         -pkzip -a dist\uw-src.zip readme *.c *.cpp *.h *.l *.y *.cap \
  144.                 uw.rsp setmode.scr uwftp.doc makefile
  145.         copy uwserver.tar dist
  146.         del uwpc201.zip
  147.         -pkzip -a uwpc201.zip dist\*.*
  148.  
  149. # Clean up all non-essential generated compilation files.
  150. clean:
  151.         del *.obj
  152.         del *.trm
  153.         del *.map
  154.         del uw.lib
  155.         del uw.bak
  156.  
  157. # Clobber all automatically generated compilation files
  158. clobber:    clean
  159.         del uw.exe
  160.         del termcc.exe
  161.         del setmode.com
  162.